package com.xiaohudie;

import com.xiaohudie.dao.LdDao;
import com.xiaohudie.entity.Ld;
import com.xiaohudie.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;
import org.junit.jupiter.api.Test;

import java.util.List;

/**
 * @Author xiao hu die
 * @Date 2022/3/17 13:22
 * @Version 1.0
 */
public class MyTest2 {
    /**
     * ResultType 和 ResultType 不能同时用*/
 @Test
    public void testSelectLDByResult(){
     SqlSession connection = MyBatisUtil.getConnection();
     LdDao mapper = connection.getMapper(LdDao.class);
     List<Ld> lds = mapper.selectLdByResult();
     for (Ld ld : lds) {
         System.out.println(ld);
     }
     MyBatisUtil.close();
 }
}
